var personOffers = new Vue({

    el: "#personOffers",

    data: {
        //询价表
        offerTable: [],
        //横向菜单列表
        goodsType: [],
        //单个询价单信息
        offerTable_show: {},


    },
    //提交时间方法
    methods: {
        //格式化时间
        formatTime:function(row, column){
            return row.type == 0 ? '报价中' : row.enabled == 1 ? '报价结束' :row.enabled == 2 ? '报价已取消':'';
        },
        //查看报价详细信息
        showResult: function (id) {

            $.post("/home/quotation/selectByQuoteOrCompareId", {"id": id}, function (data) {
                $("#wrap-left").load("http://" + window.location.host + "/home/inquiryDetailsNew.html", function () {
                    debugger
                    inquiryDetails.priceQuote = data.data.QuotationList;
                });
            });

        },
        //跳转报价单页面
        FX_Board: function (quoteOrCompare) {
            debugger
            $.post("/home/merchant/selectMerchantByUserId","", function (data) {

                    $("#wrap-left").load("http://" + window.location.host + "/home/quotationperson.html", function () {
                        debugger
                        quotation.quoteOrCompare.ifQuery=true;
                        quotation.quoteOrCompare.name = quoteOrCompare.commodityName + "*" + quoteOrCompare.commodityNum;
                        quotation.quoteOrCompare.quoteOrCompareId = quoteOrCompare.id;
                        quotation.quoteOrCompare.priceCap = quoteOrCompare.priceCap;
                        quotation.quoteOrCompare.quoteUnit=data.data.merchant.companyName;
                        quotation.quoteOrCompare.quoteName = data.data.merchant.xmname;
                        quotation.quoteOrCompare.quoteTel = data.data.merchant.tel;
                        quotation.quoteOrCompare.consingmentAdress = quoteOrCompare.shippingAddress;
                        quotation.quoteOrCompare.quoteAdrss=data.data.merchant.affiliatedRegional;
                        quotation.quoteOrCompare.num = quoteOrCompare.commodityNum;

                    });
            });
        },


        //跳转询价单详情信息
        FX_Details: function (quoteOrCompare) {

            var _this = this;
            _this.offerTable_show = quoteOrCompare;
        }

    },

    //页面加载后的初始化方法
    created: function () {
        var _this = this;
        //获得菜单标签信息
        $.post("/home/quote_or_compare/selectAllByUserId", "", function (data) {
            _this.offerTable = data.data.quoteOrCompare;
        });
    }
});